package com.ekuaitu.kuaitustaff.adapter;


import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.ekuaitu.kuaitustaff.R;
import com.ekuaitu.kuaitustaff.bean.CarReceiveOrderListBean;
import com.ekuaitu.kuaitustaff.bean.CarTaskStateBean;
import com.ekuaitu.kuaitustaff.utils.TimeUtils;


public class CarReceiveRecordAdapter extends BaseQuickAdapter<CarTaskStateBean.AttachmentBean, BaseViewHolder> {


    public CarReceiveRecordAdapter() {
        super(R.layout.activity_car_receiveorder_item, null);
    }


    @Override
    protected void convert(BaseViewHolder helper, CarTaskStateBean.AttachmentBean item) {
        helper.setText(R.id.tv_time, "接单时间:" + TimeUtils.getFormatDate(item.getStaffCarOrderModel().getReceiveTime() + "", "yyyy年MM月dd日 HH:mm"));
        helper.setText(R.id.tv_license, item.getStaffCarOrderModel().getLicenseTag());
        if (item.getStaffCarOrderModel().getTaskNameArray().size() != 0) {
            helper.setText(R.id.tv_type, item.getStaffCarOrderModel().getTaskNameArray().get(0));
        }
    }
}


